.class public abstract Llecho/lib/hellocharts/view/AbstractChartView;
.super Landroid/view/View;

# interfaces
.implements Llecho/lib/hellocharts/view/Chart;


# instance fields
.field protected axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

.field protected chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

.field protected chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

.field protected containerScrollType:Llecho/lib/hellocharts/gesture/ContainerScrollType;

.field protected dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

.field protected isContainerScrollEnabled:Z

.field protected isInteractive:Z

.field protected touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

.field protected viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    const/4 v1, 0x0

    invoke-direct {p0, p1, v0, v1}, Llecho/lib/hellocharts/view/AbstractChartView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    invoke-direct {p0, p1, p2, v0}, Llecho/lib/hellocharts/view/AbstractChartView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 2

    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 v0, 0x1

    iput-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isInteractive:Z

    const/4 v0, 0x0

    iput-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isContainerScrollEnabled:Z

    new-instance v0, Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-direct {v0}, Llecho/lib/hellocharts/computator/ChartComputator;-><init>()V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    new-instance v0, Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-direct {v0, p1, p0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;-><init>(Landroid/content/Context;Llecho/lib/hellocharts/view/Chart;)V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    new-instance v0, Llecho/lib/hellocharts/renderer/AxesRenderer;

    invoke-direct {v0, p1, p0}, Llecho/lib/hellocharts/renderer/AxesRenderer;-><init>(Landroid/content/Context;Llecho/lib/hellocharts/view/Chart;)V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0xe

    if-ge v0, v1, :cond_0

    new-instance v0, Llecho/lib/hellocharts/animation/ChartDataAnimatorV8;

    invoke-direct {v0, p0}, Llecho/lib/hellocharts/animation/ChartDataAnimatorV8;-><init>(Llecho/lib/hellocharts/view/Chart;)V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

    new-instance v0, Llecho/lib/hellocharts/animation/ChartViewportAnimatorV8;

    invoke-direct {v0, p0}, Llecho/lib/hellocharts/animation/ChartViewportAnimatorV8;-><init>(Llecho/lib/hellocharts/view/Chart;)V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    :goto_0
    return-void

    :cond_0
    new-instance v0, Llecho/lib/hellocharts/animation/ChartViewportAnimatorV14;

    invoke-direct {v0, p0}, Llecho/lib/hellocharts/animation/ChartViewportAnimatorV14;-><init>(Llecho/lib/hellocharts/view/Chart;)V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    new-instance v0, Llecho/lib/hellocharts/animation/ChartDataAnimatorV14;

    invoke-direct {v0, p0}, Llecho/lib/hellocharts/animation/ChartDataAnimatorV14;-><init>(Llecho/lib/hellocharts/view/Chart;)V

    iput-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

    goto :goto_0
.end method

.method private computeScrollViewport(FF)Llecho/lib/hellocharts/model/Viewport;
    .locals 8

    const/high16 v5, 0x40000000    # 2.0f

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v1

    new-instance v2, Llecho/lib/hellocharts/model/Viewport;

    invoke-direct {v2, v1}, Llecho/lib/hellocharts/model/Viewport;-><init>(Llecho/lib/hellocharts/model/Viewport;)V

    invoke-virtual {v0, p1, p2}, Llecho/lib/hellocharts/model/Viewport;->contains(FF)Z

    move-result v3

    if-eqz v3, :cond_0

    invoke-virtual {v1}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v3

    invoke-virtual {v1}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v1

    div-float v4, v3, v5

    div-float v5, v1, v5

    sub-float v4, p1, v4

    add-float/2addr v5, p2

    iget v6, v0, Llecho/lib/hellocharts/model/Viewport;->left:F

    iget v7, v0, Llecho/lib/hellocharts/model/Viewport;->right:F

    sub-float/2addr v7, v3

    invoke-static {v4, v7}, Ljava/lang/Math;->min(FF)F

    move-result v4

    invoke-static {v6, v4}, Ljava/lang/Math;->max(FF)F

    move-result v4

    iget v6, v0, Llecho/lib/hellocharts/model/Viewport;->bottom:F

    add-float/2addr v6, v1

    iget v0, v0, Llecho/lib/hellocharts/model/Viewport;->top:F

    invoke-static {v5, v0}, Ljava/lang/Math;->min(FF)F

    move-result v0

    invoke-static {v6, v0}, Ljava/lang/Math;->max(FF)F

    move-result v0

    add-float/2addr v3, v4

    sub-float v1, v0, v1

    invoke-virtual {v2, v4, v0, v3, v1}, Llecho/lib/hellocharts/model/Viewport;->set(FFFF)V

    :cond_0
    return-object v2
.end method

.method private computeZoomViewport(FFF)Llecho/lib/hellocharts/model/Viewport;
    .locals 9

    const/high16 v2, 0x40000000    # 2.0f

    const/high16 v0, 0x3f800000    # 1.0f

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v4

    new-instance v5, Llecho/lib/hellocharts/model/Viewport;

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v1

    invoke-direct {v5, v1}, Llecho/lib/hellocharts/model/Viewport;-><init>(Llecho/lib/hellocharts/model/Viewport;)V

    invoke-virtual {v4, p1, p2}, Llecho/lib/hellocharts/model/Viewport;->contains(FF)Z

    move-result v1

    if-eqz v1, :cond_3

    cmpg-float v1, p3, v0

    if-gez v1, :cond_4

    move p3, v0

    :cond_0
    :goto_0
    invoke-virtual {v5}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v0

    div-float v6, v0, p3

    invoke-virtual {v5}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v0

    div-float v7, v0, p3

    div-float v0, v6, v2

    div-float v2, v7, v2

    sub-float v1, p1, v0

    add-float/2addr v0, p1

    add-float v3, p2, v2

    sub-float v2, p2, v2

    iget v8, v4, Llecho/lib/hellocharts/model/Viewport;->left:F

    cmpg-float v8, v1, v8

    if-gez v8, :cond_5

    iget v1, v4, Llecho/lib/hellocharts/model/Viewport;->left:F

    add-float v0, v1, v6

    :cond_1
    :goto_1
    iget v6, v4, Llecho/lib/hellocharts/model/Viewport;->top:F

    cmpl-float v6, v3, v6

    if-lez v6, :cond_6

    iget v3, v4, Llecho/lib/hellocharts/model/Viewport;->top:F

    sub-float v2, v3, v7

    :cond_2
    :goto_2
    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getZoomType()Llecho/lib/hellocharts/gesture/ZoomType;

    move-result-object v4

    sget-object v6, Llecho/lib/hellocharts/gesture/ZoomType;->HORIZONTAL_AND_VERTICAL:Llecho/lib/hellocharts/gesture/ZoomType;

    if-ne v6, v4, :cond_7

    invoke-virtual {v5, v1, v3, v0, v2}, Llecho/lib/hellocharts/model/Viewport;->set(FFFF)V

    :cond_3
    :goto_3
    return-object v5

    :cond_4
    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaxZoom()F

    move-result v0

    cmpl-float v0, p3, v0

    if-lez v0, :cond_0

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaxZoom()F

    move-result p3

    goto :goto_0

    :cond_5
    iget v8, v4, Llecho/lib/hellocharts/model/Viewport;->right:F

    cmpl-float v8, v0, v8

    if-lez v8, :cond_1

    iget v0, v4, Llecho/lib/hellocharts/model/Viewport;->right:F

    sub-float v1, v0, v6

    goto :goto_1

    :cond_6
    iget v6, v4, Llecho/lib/hellocharts/model/Viewport;->bottom:F

    cmpg-float v6, v2, v6

    if-gez v6, :cond_2

    iget v2, v4, Llecho/lib/hellocharts/model/Viewport;->bottom:F

    add-float v3, v2, v7

    goto :goto_2

    :cond_7
    sget-object v6, Llecho/lib/hellocharts/gesture/ZoomType;->HORIZONTAL:Llecho/lib/hellocharts/gesture/ZoomType;

    if-ne v6, v4, :cond_8

    iput v1, v5, Llecho/lib/hellocharts/model/Viewport;->left:F

    iput v0, v5, Llecho/lib/hellocharts/model/Viewport;->right:F

    goto :goto_3

    :cond_8
    sget-object v0, Llecho/lib/hellocharts/gesture/ZoomType;->VERTICAL:Llecho/lib/hellocharts/gesture/ZoomType;

    if-ne v0, v4, :cond_3

    iput v3, v5, Llecho/lib/hellocharts/model/Viewport;->top:F

    iput v2, v5, Llecho/lib/hellocharts/model/Viewport;->bottom:F

    goto :goto_3
.end method


# virtual methods
.method public animationDataFinished()V
    .locals 1

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/model/ChartData;->finish()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->onChartViewportChanged()V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public animationDataUpdate(F)V
    .locals 1

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getChartData()Llecho/lib/hellocharts/model/ChartData;

    move-result-object v0

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/model/ChartData;->update(F)V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->onChartViewportChanged()V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public canScrollHorizontally(I)Z
    .locals 6

    const/4 v0, 0x1

    const/4 v1, 0x0

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getZoomLevel()F

    move-result v2

    float-to-double v2, v2

    const-wide/high16 v4, 0x3ff0000000000000L    # 1.0

    cmpg-double v2, v2, v4

    if-gtz v2, :cond_1

    move v0, v1

    :cond_0
    :goto_0
    return v0

    :cond_1
    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v2

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v3

    if-gez p1, :cond_2

    iget v2, v2, Llecho/lib/hellocharts/model/Viewport;->left:F

    iget v3, v3, Llecho/lib/hellocharts/model/Viewport;->left:F

    cmpl-float v2, v2, v3

    if-gtz v2, :cond_0

    move v0, v1

    goto :goto_0

    :cond_2
    iget v2, v2, Llecho/lib/hellocharts/model/Viewport;->right:F

    iget v3, v3, Llecho/lib/hellocharts/model/Viewport;->right:F

    cmpg-float v2, v2, v3

    if-ltz v2, :cond_0

    move v0, v1

    goto :goto_0
.end method

.method public cancelDataAnimation()V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

    invoke-interface {v0}, Llecho/lib/hellocharts/animation/ChartDataAnimator;->cancelAnimation()V

    return-void
.end method

.method public computeScroll()V
    .locals 1

    invoke-super {p0}, Landroid/view/View;->computeScroll()V

    iget-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isInteractive:Z

    if-eqz v0, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->computeScroll()Z

    move-result v0

    if-eqz v0, :cond_0

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    :cond_0
    return-void
.end method

.method public getAxesRenderer()Llecho/lib/hellocharts/renderer/AxesRenderer;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    return-object v0
.end method

.method public getChartComputator()Llecho/lib/hellocharts/computator/ChartComputator;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    return-object v0
.end method

.method public getChartRenderer()Llecho/lib/hellocharts/renderer/ChartRenderer;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    return-object v0
.end method

.method public getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;
    .locals 1

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getChartRenderer()Llecho/lib/hellocharts/renderer/ChartRenderer;

    move-result-object v0

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    return-object v0
.end method

.method public getMaxZoom()F
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v0}, Llecho/lib/hellocharts/computator/ChartComputator;->getMaxZoom()F

    move-result v0

    return v0
.end method

.method public getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    return-object v0
.end method

.method public getSelectedValue()Llecho/lib/hellocharts/model/SelectedValue;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->getSelectedValue()Llecho/lib/hellocharts/model/SelectedValue;

    move-result-object v0

    return-object v0
.end method

.method public getTouchHandler()Llecho/lib/hellocharts/gesture/ChartTouchHandler;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    return-object v0
.end method

.method public getZoomLevel()F
    .locals 4

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getMaximumViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v1

    invoke-virtual {v0}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v2

    invoke-virtual {v1}, Llecho/lib/hellocharts/model/Viewport;->width()F

    move-result v3

    div-float/2addr v2, v3

    invoke-virtual {v0}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v0

    invoke-virtual {v1}, Llecho/lib/hellocharts/model/Viewport;->height()F

    move-result v1

    div-float/2addr v0, v1

    invoke-static {v2, v0}, Ljava/lang/Math;->max(FF)F

    move-result v0

    return v0
.end method

.method public getZoomType()Llecho/lib/hellocharts/gesture/ZoomType;
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->getZoomType()Llecho/lib/hellocharts/gesture/ZoomType;

    move-result-object v0

    return-object v0
.end method

.method public isContainerScrollEnabled()Z
    .locals 1

    iget-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isContainerScrollEnabled:Z

    return v0
.end method

.method public isInteractive()Z
    .locals 1

    iget-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isInteractive:Z

    return v0
.end method

.method public isScrollEnabled()Z
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->isScrollEnabled()Z

    move-result v0

    return v0
.end method

.method public isValueSelectionEnabled()Z
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->isValueSelectionEnabled()Z

    move-result v0

    return v0
.end method

.method public isValueTouchEnabled()Z
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->isValueTouchEnabled()Z

    move-result v0

    return v0
.end method

.method public isViewportCalculationEnabled()Z
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->isViewportCalculationEnabled()Z

    move-result v0

    return v0
.end method

.method public isZoomEnabled()Z
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->isZoomEnabled()Z

    move-result v0

    return v0
.end method

.method public moveTo(FF)V
    .locals 1

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/view/AbstractChartView;->computeScrollViewport(FF)Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    invoke-virtual {p0, v0}, Llecho/lib/hellocharts/view/AbstractChartView;->setCurrentViewport(Llecho/lib/hellocharts/model/Viewport;)V

    return-void
.end method

.method public moveToWithAnimation(FF)V
    .locals 1

    invoke-direct {p0, p1, p2}, Llecho/lib/hellocharts/view/AbstractChartView;->computeScrollViewport(FF)Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    invoke-virtual {p0, v0}, Llecho/lib/hellocharts/view/AbstractChartView;->setCurrentViewportWithAnimation(Llecho/lib/hellocharts/model/Viewport;)V

    return-void
.end method

.method protected onChartDataChange()V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v0}, Llecho/lib/hellocharts/computator/ChartComputator;->resetContentRect()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->onChartDataChanged()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    invoke-virtual {v0}, Llecho/lib/hellocharts/renderer/AxesRenderer;->onChartDataChanged()V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 2

    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->isEnabled()Z

    move-result v0

    if-eqz v0, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawInBackground(Landroid/graphics/Canvas;)V

    invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I

    move-result v0

    iget-object v1, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v1}, Llecho/lib/hellocharts/computator/ChartComputator;->getContentRectMinusAllMargins()Landroid/graphics/Rect;

    move-result-object v1

    invoke-virtual {p1, v1}, Landroid/graphics/Canvas;->clipRect(Landroid/graphics/Rect;)Z

    iget-object v1, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v1, p1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->draw(Landroid/graphics/Canvas;)V

    invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->restoreToCount(I)V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->drawUnclipped(Landroid/graphics/Canvas;)V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/renderer/AxesRenderer;->drawInForeground(Landroid/graphics/Canvas;)V

    :goto_0
    return-void

    :cond_0
    sget v0, Llecho/lib/hellocharts/util/ChartUtils;->DEFAULT_COLOR:I

    invoke-virtual {p1, v0}, Landroid/graphics/Canvas;->drawColor(I)V

    goto :goto_0
.end method

.method protected onMeasure(II)V
    .locals 0

    invoke-super {p0, p1, p2}, Landroid/view/View;->onMeasure(II)V

    return-void
.end method

.method protected onSizeChanged(IIII)V
    .locals 7

    invoke-super {p0, p1, p2, p3, p4}, Landroid/view/View;->onSizeChanged(IIII)V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getWidth()I

    move-result v1

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getHeight()I

    move-result v2

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getPaddingLeft()I

    move-result v3

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getPaddingTop()I

    move-result v4

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getPaddingRight()I

    move-result v5

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getPaddingBottom()I

    move-result v6

    invoke-virtual/range {v0 .. v6}, Llecho/lib/hellocharts/computator/ChartComputator;->setContentRect(IIIIII)V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->onChartSizeChanged()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    invoke-virtual {v0}, Llecho/lib/hellocharts/renderer/AxesRenderer;->onChartSizeChanged()V

    return-void
.end method

.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 3

    invoke-super {p0, p1}, Landroid/view/View;->onTouchEvent(Landroid/view/MotionEvent;)Z

    iget-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isInteractive:Z

    if-eqz v0, :cond_2

    iget-boolean v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isContainerScrollEnabled:Z

    if-eqz v0, :cond_1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getParent()Landroid/view/ViewParent;

    move-result-object v1

    iget-object v2, p0, Llecho/lib/hellocharts/view/AbstractChartView;->containerScrollType:Llecho/lib/hellocharts/gesture/ContainerScrollType;

    invoke-virtual {v0, p1, v1, v2}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->handleTouchEvent(Landroid/view/MotionEvent;Landroid/view/ViewParent;Llecho/lib/hellocharts/gesture/ContainerScrollType;)Z

    move-result v0

    :goto_0
    if-eqz v0, :cond_0

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    :cond_0
    const/4 v0, 0x1

    :goto_1
    return v0

    :cond_1
    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->handleTouchEvent(Landroid/view/MotionEvent;)Z

    move-result v0

    goto :goto_0

    :cond_2
    const/4 v0, 0x0

    goto :goto_1
.end method

.method protected resetRendererAndTouchHandler()V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0}, Llecho/lib/hellocharts/renderer/ChartRenderer;->resetRenderer()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->axesRenderer:Llecho/lib/hellocharts/renderer/AxesRenderer;

    invoke-virtual {v0}, Llecho/lib/hellocharts/renderer/AxesRenderer;->resetRenderer()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->resetTouchHandler()V

    return-void
.end method

.method public resetViewports()V
    .locals 2

    const/4 v1, 0x0

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, v1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->setMaximumViewport(Llecho/lib/hellocharts/model/Viewport;)V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, v1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->setCurrentViewport(Llecho/lib/hellocharts/model/Viewport;)V

    return-void
.end method

.method public selectValue(Llecho/lib/hellocharts/model/SelectedValue;)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->selectValue(Llecho/lib/hellocharts/model/SelectedValue;)V

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->callTouchListener()V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setChartRenderer(Llecho/lib/hellocharts/renderer/ChartRenderer;)V
    .locals 0

    iput-object p1, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->resetRendererAndTouchHandler()V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setContainerScrollEnabled(ZLlecho/lib/hellocharts/gesture/ContainerScrollType;)V
    .locals 0

    iput-boolean p1, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isContainerScrollEnabled:Z

    iput-object p2, p0, Llecho/lib/hellocharts/view/AbstractChartView;->containerScrollType:Llecho/lib/hellocharts/gesture/ContainerScrollType;

    return-void
.end method

.method public setCurrentViewport(Llecho/lib/hellocharts/model/Viewport;)V
    .locals 1

    if-eqz p1, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->setCurrentViewport(Llecho/lib/hellocharts/model/Viewport;)V

    :cond_0
    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setCurrentViewportWithAnimation(Llecho/lib/hellocharts/model/Viewport;)V
    .locals 2

    if-eqz p1, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    invoke-interface {v0}, Llecho/lib/hellocharts/animation/ChartViewportAnimator;->cancelAnimation()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v1

    invoke-interface {v0, v1, p1}, Llecho/lib/hellocharts/animation/ChartViewportAnimator;->startAnimation(Llecho/lib/hellocharts/model/Viewport;Llecho/lib/hellocharts/model/Viewport;)V

    :cond_0
    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setCurrentViewportWithAnimation(Llecho/lib/hellocharts/model/Viewport;J)V
    .locals 2

    if-eqz p1, :cond_0

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    invoke-interface {v0}, Llecho/lib/hellocharts/animation/ChartViewportAnimator;->cancelAnimation()V

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    invoke-virtual {p0}, Llecho/lib/hellocharts/view/AbstractChartView;->getCurrentViewport()Llecho/lib/hellocharts/model/Viewport;

    move-result-object v1

    invoke-interface {v0, v1, p1, p2, p3}, Llecho/lib/hellocharts/animation/ChartViewportAnimator;->startAnimation(Llecho/lib/hellocharts/model/Viewport;Llecho/lib/hellocharts/model/Viewport;J)V

    :cond_0
    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setDataAnimationListener(Llecho/lib/hellocharts/animation/ChartAnimationListener;)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/animation/ChartDataAnimator;->setChartAnimationListener(Llecho/lib/hellocharts/animation/ChartAnimationListener;)V

    return-void
.end method

.method public setInteractive(Z)V
    .locals 0

    iput-boolean p1, p0, Llecho/lib/hellocharts/view/AbstractChartView;->isInteractive:Z

    return-void
.end method

.method public setMaxZoom(F)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/computator/ChartComputator;->setMaxZoom(F)V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setMaximumViewport(Llecho/lib/hellocharts/model/Viewport;)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->setMaximumViewport(Llecho/lib/hellocharts/model/Viewport;)V

    invoke-static {p0}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;)V

    return-void
.end method

.method public setScrollEnabled(Z)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->setScrollEnabled(Z)V

    return-void
.end method

.method public setValueSelectionEnabled(Z)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->setValueSelectionEnabled(Z)V

    return-void
.end method

.method public setValueTouchEnabled(Z)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->setValueTouchEnabled(Z)V

    return-void
.end method

.method public setViewportAnimationListener(Llecho/lib/hellocharts/animation/ChartAnimationListener;)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->viewportAnimator:Llecho/lib/hellocharts/animation/ChartViewportAnimator;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/animation/ChartViewportAnimator;->setChartAnimationListener(Llecho/lib/hellocharts/animation/ChartAnimationListener;)V

    return-void
.end method

.method public setViewportCalculationEnabled(Z)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartRenderer:Llecho/lib/hellocharts/renderer/ChartRenderer;

    invoke-interface {v0, p1}, Llecho/lib/hellocharts/renderer/ChartRenderer;->setViewportCalculationEnabled(Z)V

    return-void
.end method

.method public setViewportChangeListener(Llecho/lib/hellocharts/listener/ViewportChangeListener;)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->chartComputator:Llecho/lib/hellocharts/computator/ChartComputator;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/computator/ChartComputator;->setViewportChangeListener(Llecho/lib/hellocharts/listener/ViewportChangeListener;)V

    return-void
.end method

.method public setZoomEnabled(Z)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->setZoomEnabled(Z)V

    return-void
.end method

.method public setZoomLevel(FFF)V
    .locals 1

    invoke-direct {p0, p1, p2, p3}, Llecho/lib/hellocharts/view/AbstractChartView;->computeZoomViewport(FFF)Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    invoke-virtual {p0, v0}, Llecho/lib/hellocharts/view/AbstractChartView;->setCurrentViewport(Llecho/lib/hellocharts/model/Viewport;)V

    return-void
.end method

.method public setZoomLevelWithAnimation(FFF)V
    .locals 1

    invoke-direct {p0, p1, p2, p3}, Llecho/lib/hellocharts/view/AbstractChartView;->computeZoomViewport(FFF)Llecho/lib/hellocharts/model/Viewport;

    move-result-object v0

    invoke-virtual {p0, v0}, Llecho/lib/hellocharts/view/AbstractChartView;->setCurrentViewportWithAnimation(Llecho/lib/hellocharts/model/Viewport;)V

    return-void
.end method

.method public setZoomType(Llecho/lib/hellocharts/gesture/ZoomType;)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->touchHandler:Llecho/lib/hellocharts/gesture/ChartTouchHandler;

    invoke-virtual {v0, p1}, Llecho/lib/hellocharts/gesture/ChartTouchHandler;->setZoomType(Llecho/lib/hellocharts/gesture/ZoomType;)V

    return-void
.end method

.method public startDataAnimation()V
    .locals 4

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

    const-wide/high16 v2, -0x8000000000000000L

    invoke-interface {v0, v2, v3}, Llecho/lib/hellocharts/animation/ChartDataAnimator;->startAnimation(J)V

    return-void
.end method

.method public startDataAnimation(J)V
    .locals 1

    iget-object v0, p0, Llecho/lib/hellocharts/view/AbstractChartView;->dataAnimator:Llecho/lib/hellocharts/animation/ChartDataAnimator;

    invoke-interface {v0, p1, p2}, Llecho/lib/hellocharts/animation/ChartDataAnimator;->startAnimation(J)V

    return-void
.end method
